#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>

int main(int argc, char const *argv[])
{
    pid_t pid;
    printf("Create process study!\n");
    pid = fork();
    if (pid == 0) {
        printf("我是子进程 PID: %d\n", getpid());
    }else if(pid == -1) {
        printf("呵呵 你创建子进程失败了！\n");
        exit(1);

    }else if(pid > 0) {
        printf("我是父进程，我创建的子进程是 %d\n", pid);
    }
    return 0;
}
